package com.larseknu.playingwithlayouts; import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ViewServer.get(this).addWindow(this); } @Override public void onDestroy() { super.onDestroy(); ViewServer.get(this).removeWindow(this); } @Override public void onResume() { super.onResume(); ViewServer.get(this).setFocusedWindow(this); } }